#ifndef PORT_H
#define PORT_H

/******************************************************************
| includes
| 1) system and project includes| 2) needed interfaces from external units
| 3) internal and external interfaces from this unit
|-----------------------------------------------------------------*/
#include "Port_Cfg.h"
#include "Port_Hw.h"
#include "Std_Types.h"

/*******************************************************************
| defines and macros (scope: module-local)
|------------------------------------------------------------------*/

/* Error Values  [PORT051] [PORT115] [PORT087] [PORT038] */
#define PORT_E_REINIT					0x09
#define PORT_E_PARAM_PIN                0x0A
#define PORT_E_DIRECTION_UNCHANGEABLE   0x0B
#define PORT_E_PARAM_CONFIG				0x0C
#define PORT_E_PARAM_INVALID_MODE		0x0D
#define PORT_E_MODE_UNCHANGEABLE		0x0E
#define PORT_E_UNINIT					0x0F

/* Service IDs */
#define PORT_INIT_ID                	0x00
#define PORT_SETPINDIRECTION_ID     	0x01
#define PORT_REFRESHPINDIRECTION_ID     0x02
#define PORT_GETVERSIONINFO_ID          0x03
#define PORT_SETPINMODE_ID    			0x04

/********************UNKNOWN****************************///
#define PORT_VENDOR_ID           VENDOR_ID
#define PORT_AR_MAJOR_VERSION    1
#define PORT_AR_MINOR_VERSION    1
#define PORT_AR_PATCH_VERSION    1

#define PORT_INSTANCE_ID         0x0

/*******************************************************************
| function prototypes (scope: module-exported)
|------------------------------------------------------------------*/
void Port_Init(const Port_ConfigType* ConfigPtr);

#endif /* PORT_H_ */
